<!-- #setting classic_compatible=true -->
<style>
  ul{
    list-style:none;
  }
  ul li{
    line-height:30px;
  }
  div.mainarea{
     border:dodgerblue 1px solid;
     padding:10px; 
  }
</style>
<div>
<button id="saveBtn">保存</button>
<button id="usersBtn">所有用户</button>
</div>
<form class="deptForm">
<fieldset>
<legend>编辑部门</legend>
<input type="hidden" name="bean.sortNum" value="${(bean.sortNum)?default("100")}" id="sortNum"/>
<#if bean.id??>
 <input type="hidden" name="bean.id" value="${bean.id}" />
 <script type="text/javascript">
    var action = 'update';
 </script>
</#if>
<#if bean.parent?? >
<input type="hidden" name="bean.parent.id" value="${(bean.parent.id)!}" id="parent"/>
</#if>
<ul>
  <li><button id="selparent" type="button">上级</button>
	<label id="parentName">${(bean.parent.name)!}</label></li>
  <li>名称 : <input name="bean.name" type="text" id="name" value="${bean.name}" /></li>
  <li>类型: <select name="bean.departmentType">
             <#list stack.findValue("@org.jackysoft.entity.DepartmentType@values()") as dtype>
                  <#if bean.departmentType?? && dtype==bean.departmentType>
                     <option value="${dtype}" selected>${dtype}</option>
                  <#else>
                     <option value="${dtype}">${dtype}</option>
                  </#if>
         			
      		 </#list>
            </select>
          </li>
  
</ul>
</fieldset>
</form>
<script type="text/javascript">
  var deptId = '${bean.id}';
</script>
<script language="javascript" src="scripts/apps/admin/department/edit.js"></script>